package com.jiazhong.jdbc.spring;

import com.jiazhong.jdbc.spring.controller.UserController;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Component;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

/**
 * @Auther:shuXin
 */
@SpringJUnitConfig(locations = "classpath:bean.xml")
@Component
public class TxByAnnotationTest {
    @Autowired
    private UserController userController;

    @Test
    public void test01(){
        userController.buyBook(1,1);
    }
    @Test
    public void test02(){
        Integer [] arr = {1,2};
        userController.checkOut(arr,1);
    }
}
